﻿using Castle.ActiveRecord;
using Financial.Infra.DDD;
using Financial.Core.Modulos.ModuloUsuario;
using Financial.Core.Modulos.ModuloDebito;
using System.Collections.Generic;
using Financial.Core.Modulos.ModuloCartao;

namespace Financial.Core.Modulos.ModuloCredor
{
    [ActiveRecord]
    public class Credor : IIdentifiable
    {

        [PrimaryKey]
        public int Id { get; set; }

        [Property]
        public string CRE_STR_DESCRICAO { get; set; }

        [BelongsTo("CRE_ID_CARTAO")]
        public Cartao Cartao { get; set; }

        [BelongsTo("CRE_ID_USUARIO")]
        public Usuario Usuario { get; set; }

        [HasMany(MapType = typeof(Debito), Lazy = true, Inverse = true)]
        public IList<Debito> Debito { get; set; }
    }
}
